1. Field of the Invention
The present invention relates generally to a memory management device for memory devices, and relates particularly to a memory management device, for memory devices, in which a free block address table for storing address data for data-writable free blocks and a conversion table for performing conversion thereof into corresponding block address data within the free block table in accordance with address numbers designated from outside the memory device are shared to make efficient use of table memory area.
2. Description of the Related Art
As described in Interface magazine (July 1989, pp. 203-209) and in Japanese Laid-Open Patent Application (Japanese Publication) 4-184645, conventional memory management devices manage memory by dividing memory areas (which are employed by a process involving dynamic protection and freeing during program execution) into a plurality of blocks of the same given size.
Such memory management devices include, for example, that disclosed in Japanese Laid-Open Patent Application (Japanese Publication) 6-208502, which is directed to more efficient utilization of memory area and a reduction in the time required to search for free blocks, and that of Japanese Laid-Open Patent Application (Japanese Publication) 4-219836, which is aimed at more effective utilization of file resources by effective allocation of free blocks within block partitions.
This type of memory management device includes a conversion table which is used for converting addresses designated by an external main device into block address data corresponding thereto and a free block table which stores free block addresses of free blocks, i.e., data-writable blocks are provided as separate tables. The division of responsibility between the tables is determined so that table data management can be performed smoothly.
This memory management device will be described using the example of a device which has addresses, 1xcx9c90, that can be designated by an external main device, in which the number of data (the number of unit data transferable to and from the external main device) written per block is one and which has 100 blocks.
Assuming that a capacity of one byte is required in the free block table for storing each block address, a capacity of 90 bytes is required by the conversion table and a capacity of 100 bytes is required by the free block table.
The memory management device can employ, for example, a memory card.
The memory card can be an IC card, a magnetic card, or the like.
Some IC cards house microcomputers and semiconductor memory.
(IC Card Types)
IC cards are classified as IC memory cards that house large-capacity semiconductor memory, IC cards that house microcomputers and semiconductor memory and that are provided with a CPU that has a storage function and a processing function, and multi-functional IC cards that are provided with CPU-equipped IC card functionality and that are further capable of data input and display in single card form when used with a keyboard display.
(Example of a System a Employing Memory Card)
An example of a system which employs this type of memory card will be given below.
A microcomputer and memory are mounted on this IC card using high-density mounting technology. This IC card houses, for example, an 8-bit microcomputer and a memory comprising 64-Kbit EEPROM; data exchange with an external device, under management by the microcomputer control program, takes place through a contact point furnished on the surface of the IC card.
In this IC card, the memory area is provided with a conversion memory table and a free block (data-writable block) table.
However, in the memory management device described above, the conversion memory table and the free block table are provided to separate tables making it impossible to reduce the storage capacity of the storage medium.
In the above described example, with this type of memory management device, the number of free blocks in the initial state (when no data has yet been stored in any of the blocks) is 100, and thus all 100 byte of data is required to be written in the free block table.
On the other hand, with this type of memory management device, in the case which the number of free blocks is 10, the capacity of the free block table in which the data is written is 10 bytes with the remaining 90-byte capacity remaining unused.
Thus, with this type of memory management device, a memory area equivalent to 90 bytes remains unused during data write operations, and this surplus memory area is protected, preventing more efficient use of the memory area.
An object of the present invention is to reduce unused memory area within blocks to make efficient memory area utilization possible, and to reduce the number of memories to be managed.
A further object of the present invention is to make the storage medium more compact without reducing search speed.
The present invention solves the problem noted above by sharing the free block table and the conversion table. The invention is described more specifically herein below.
The first aspect of the invention is a memory device provided with a nonvolatile memory medium that is rewritable in each block which serves as the unit of data storage. The memory device of the invention comprises a free block table for storing data for each free block address number corresponding to a data-writable free block. The memory device of the invention further comprises a conversion table, located in the free block table, for storing address data for blocks corresponding to address numbers designated from outside the memory device and for performing designated address number-block address data conversion. In the memory device of the present invention, the conversion table is provided with a free block address data identification component for identifying block address data.
Nonvolatile memory medium refers to, for example, flash EEPROM. Block refers to an erasable unit.
With the present invention, in a nonvolatile memory medium which is rewritable in each block (the unit of data storage), data is stored in a free block table for each free block address number corresponding to a data-writable free block, address numbers designated from outside the memory device are converted to block address data by a conversion table provided within the free block table, and the free block address data is identified by a free block address data identification component in the conversion table.
Since the conversion table is placed within the free block table and the tables are shared, the table capacity can be reduced by an amount equivalent to the conversion table, so the memory medium can be made more compact.
By using, for example, a flag located at the lead position of a conversion table address component as the free block address data identification component, it is possible to efficiently search through the conversion table and the free block table, and to avoid a reduction in search speed, even in compact storage media.
The second aspect of the invention employs the free data block component (the area excluding the conversion table in the free block table) as a memory area component for first in first out processing whereby output proceeds sequentially starting from the data input first, and, when retrieving data from the conversion table, conversely employs the free data block table as a memory area component for last in first out processing whereby output proceeds sequentially starting from the data most recently stored.
Here, a component that processes by FIFO (first in first out) can be used as the memory area component for first in first out processing.
A component that processes by LIFO (last in first out) can be used as the memory area component for last in first out processing.
Since the second aspect of the invention employs the free data block component (the area excluding the conversion table in the free block table) as a memory area component for first in first out processing whereby output proceeds sequentially starting from the data input first, and, when retrieving data from the conversion table, conversely employs the free data block table as a memory area component for last in first out processing whereby output proceeds sequentially starting from the data most recently stored, free block searches and registration can be performed rapidly.
The third aspect of the invention employs the free block table as a queue component for awaiting processing, and, during data retrieval, conversely employs the free block table as a stack component for last in first out processing whereby output proceeds sequentially starting from the item most recently stored.
A component that processes by queuing can be used as the queue component, in the invention.
A component that processes by stacking can be used as the stack component, in the invention.
Since the third aspect of the invention employs the free block table as a queue component for awaiting processing, and, during data retrieval, conversely employs the free block table as a stack component for last in first out processing whereby output proceeds sequentially starting from the item most recently stored, free block searches and registration can be performed with speed and reliability.
The fourth aspect of the invention employs the free block component as a memory area component for first in first out processing whereby output proceeds sequentially starting from the item input first, and, when retrieving data from the conversion table, conversely employs it as a memory area component for last in first out processing whereby output proceeds sequentially starting from the item most recently stored.
Since the fourth aspect of the invention employs the free block component as a memory area component for first in first out processing whereby output proceeds sequentially starting from the item input first, and, when retrieving data from the conversion table, conversely employs it as a memory area component for last in first out processing whereby output proceeds sequentially starting from the item most recently stored, free block searches and registration can be performed rapidly.
The fifth aspect of the invention searches table contents by searching for registrable areas from free block components following the sequence of the conversion table during registration of free blocks.
Since the fifth aspect of the invention searches table contents by searching for registrable areas from free block components following the sequence of the conversion table during registration of free blocks, the search time can be reduced.
The following are examples of locations for the free block table in the present invention described above.
First, the free block table can be located in memory in a memory card. This allows the memory to be made more compact. Memory cards include magnetic cards and IC cards.
Next, the free block table can be located in random access memory. This allows data write operations to be performed rapidly.
Further, the free block table can be located in flash memory. This allows data write and read operations to be performed rapidly.